﻿@{
    ViewBag.Title = "设置";
}
<div data-bind="foreach:SettingGroups">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5 data-bind="text:DisplayName"></h5>
                </div>
                <div class="ibox-content">
                    <div class="well" data-bind="text:Description">
                        
                    </div>
                    <div class="row">
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


@section Scripts {
   <script>
       function ViewModel() {
           var self = this;
           this.SettingGroups = ko.observableArray([]);
           this.SettingValues = ko.observableArray([]);
           //初始化，加载数据
           this.Init = function () {
               mwc.restApi.get({
                   url: '@Url.Action("GetGroups")',
                   success: function (data) {
                       self.SettingGroups(data);
                   }
               });
           };
           self.Init();
       }
       $(function () {
           window.CurrentModel = new ViewModel();
           ko.applyBindings(window.CurrentModel);
       });
    </script>
}